package com.acme.task4;

public class Task4Arrays {
	public static void main(String[] args) {
		int array[] = { 3, 7, 7, 3, 9, 3, 9, 9, 7, 3, 9, 3, 3 };
		displayCounts(array);
	}
	
	private static void displayCounts(int[] array) {
		int count3 = 0, count7 = 0, count9 = 0;

		for (int x : array) {
			if (x == 3) {
				count3++;
			} else if (x == 7) {
				count7++;
			} else {
				count9++;
			}
		}

		System.out.printf("Number of 3: %d%n", count3);
		System.out.printf("Number of 7: %d%n", count7);
		System.out.printf("Number of 9: %d%n", count9);
	}
}
